<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<title>BKProfile - Kết nối tri thức - Chia sẻ thành công</title>
		<style type="text/css">
			div.loading-invisible{
		    	display:none;
		  	}
  
		  	div.loading-visible{
		    	display:block;
			    /*position it 200px down the screen*/
			    position:absolute;
			    top:200px;
			    left:0;
			    width:100%;
			    text-align:center;
			    /*in supporting browsers, make it
			      a little transparent*/
			    background:#fff;
			    filter: alpha(opacity=75); /* internet explorer */
			    -khtml-opacity: 0.75;      /* khtml, old safari */
			    -moz-opacity: 0.75;       /* mozilla, netscape */
			    opacity: 0.75;           /* fx, safari, opera */
			    border-top:1px solid #ddd;
			    border-bottom:1px solid #ddd;
		  	}
		</style>
		<script type="text/javascript">
			var _gaq = _gaq || [];
			_gaq.push(['_setAccount', 'UA-22250004-1']);
			_gaq.push(['_trackPageview']);
			
			(function() {
				var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
			    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
			    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
			})();
		</script>
	</head>

    <body>
    	<!-- Loading image -->
    	<div id="loading" class="loading-visible">
	  		<p><img src="static/images/loading.gif" /></p>
		</div>
		
		<script type="text/javascript">
		  document.getElementById("loading").className = "loading-visible";
		  var hideDiv = function(){document.getElementById("loading").className = "loading-invisible";};
		  var oldLoad = window.onload;
		  var newLoad = oldLoad ? function(){hideDiv.call(this);oldLoad.call(this);} : hideDiv;
		  window.onload = newLoad;
		</script>
		
        <script type="text/javascript" src="static/js/all.beta.obfuscated.js"></script>

		<link href="static/css/all.beta.obfuscated.css" rel="stylesheet" type="text/css" />
		
        <script>
        	//Fix bug in IE
        	if (typeof String.prototype.trim !== 'function') {   
        		String.prototype.trim = function() {
        			return this.replace(/^\s+|\s+$/g, "");   
        		} 
        	}
        	if(typeof Array.prototype.indexOf !== 'function'){
	    		Array.prototype.indexOf = function(obj){
	        		for(var i=0; i<this.length; i++){
	            		if(this[i]==obj){
	                		return i;
	            		}
	        		}
	        		return -1;
	    		}
	    	} 
        
            $(document).ready(function(){
				$.get('static/microtemplating/all.beta.txt', {}, function(ret)	{
					var useragent = navigator.userAgent;
					if (useragent.indexOf('MSIE') != -1)	{
						$('#Application-Main').html(ret);
					} else {
						document.getElementById('Application-Main').innerHTML = ret;
					}
					var bkbootstrap = new BKBootstrap();
	                var app = SingletonFactory.getInstance(Application);
	                app.getSystemProperties().set("host.root", "/");
	                app.getSystemProperties().set("page.default", "Home");
	                app.setBootstrap(bkbootstrap);
	                Request.setProactive(true);
					app.begin();
					
	                $(window).bind("hashchange", function(){
	                    if (Request.getProactive != true) {
	                        var subject = SingletonFactory.getInstance(Subject);
	                        subject.notifyEvent('NeedAssembleRequest');
	                    }
	                    Request.setProactive(false);
	                });
				});
            });
			
            function generateEvent(eventName, eventData){
                var subject = SingletonFactory.getInstance(Subject);
                subject.notifyEvent(eventName, eventData);
            }
        </script>
		
        <div id="Application-Main"></div>
        <script type="text/javascript" src="static/js/thirdparty/tinyeditor/packed.js" build="no"></script>
</body>
</html>